<?php 
if(!defined('PATH')){die('Access denied.');}
$titleName='Login -- SS-PicWall';
include_once(PATH.'template/_head.php'); ?>
	<script src="./js/md5.js" type="text/javascript"></script>
	<script type="text/javascript">
		function goLogin(){
			nwPswMd5 = hex_md5(hex_md5(document.getElementById("realpsw").value) + document.getElementById('checkcode').value)
			document.getElementById("realpsw").value = ""
			document.getElementById("sendpsw").value = nwPswMd5
		}
	</script>
	<div>
		<p>
			<form method="post" action="<?php echo SURL;?>">
				Username:
				<br />
				<input name="username" type="text" size="18" />
				<br />
				Password:
				<br />
				<input id="realpsw" type="password" size="18" value="" />
				<br />
				<input id="sendpsw" name="password" type="hidden" value="" />
				<input id="checkcode" type="hidden" value="<?php echo $_SESSION['randomCode'];?>" />
				<input name="cmd" type="hidden" value="login" />
				<input name="act" type="hidden" value="login" />
				<input type="submit" onclick="goLogin()" value="Login" />
			</form>
			<br />
			Have trouble login? use <a href="<?php echo SURL;?>?cmd=login&amp;nojs">non-javascript login</a> (not suggested).
			<br />
			<a href="<?php echo SURL;?>?cmd=reg">Create</a> a new account.
		</p>
	</div>
<?php include_once(PATH.'template/_foot.php');
